-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RFC: Change Sockets.recvfrom
to return full InetAddr instead of just host
#32729
Conversation
I’m half inclined to make this as a breaking change (instead of adding 2), since the current Anyways, 👍 for addressing this issue! |
I'm perfectly content to wait for the next major revision if it leads to a more sensible Thanks, @vtjnash! |
ffc622e
to
f7303bf
Compare
I've now made this pull request a breaking change to the Sockets API. Please let me know if I should revert. Thanks! |
Triage is OK with this. To do:
|
Sockets.recvfrom2
to return both host and portSockets.recvfrom
to return full InetAddr instead of just host
Oops... I'll get those updated this evening. |
@JeffBezanson One question: the guidelines indicate that news updates should be in a separate commit but then suggest news updates in a regular PR might cause problems; should I update news in this PR as its own commit? Thanks! |
I think it only suggests a separate commit as a way for the NEWS item to reference its own PR number; the commits can be squashed after that. The other part only refers to |
f7303bf
to
81709fd
Compare
Done. Let me know if I need to change or add anything else. |
Thanks. I edited the text a bit and merged. |
When awaiting PDUs from as yet unknown UDP clients, it is necessary to know the port of the client's socket in order to reply to said client. Returning not only the source address but, also, the source port of received PDUs ensures we can reply to clients without relaying this information in application data.